<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <!-- 隐藏字段：当前教学点ID -->
    <input type="hidden" id="current-ocation-id" value="{$ocation_id|default=0}">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">添加消息</h3>
        </div>
        <div class="panel-body">
            <div class="col-md-12">
                <div class="form-group">
                    <label for="c-title" class="control-label col-xs-12 col-sm-2">标题:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input id="c-title" class="form-control" name="row[title]" type="text" value="" data-rule="required" data-tip="请输入标题">
                    </div>
                </div>
                <div class="form-group">
                    <label for="c-message_type" class="control-label col-xs-12 col-sm-2">消息类型:</label>
                    <div class="col-xs-12 col-sm-8">
                        <select id="c-message_type" class="form-control" name="row[message_type]" data-rule="required">
                            <option value="">请选择消息类型</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="c-push_type" class="control-label col-xs-12 col-sm-2">推送方式:</label>
                    <div class="col-xs-12 col-sm-8">
                        <div class="radio-inline">
                            <label for="c-push_type-1">
                                <input id="c-push_type-1" name="row[push_type]" type="radio" value="1" data-rule="required"> 单发
                            </label>
                        </div>
                        <div class="radio-inline">
                            <label for="c-push_type-2">
                                <input id="c-push_type-2" name="row[push_type]" type="radio" value="2" data-rule="required"> 群发
                            </label>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label for="c-content" class="control-label col-xs-12 col-sm-2">内容:</label>
                    <div class="col-xs-12 col-sm-8">
                        <textarea id="c-content" class="form-control editor" name="row[content]" data-rule="required"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label for="c-quick_link" class="control-label col-xs-12 col-sm-2">快捷链接:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input id="c-quick_link" class="form-control" name="row[quick_link]" type="text" value="" placeholder="请输入快捷链接地址">
                    </div>
                </div>
                <div class="form-group">
                    <label for="c-booking_project" class="control-label col-xs-12 col-sm-2">预约报名项目:</label>
                    <div class="col-xs-12 col-sm-8">
                        <select id="c-booking_project" class="form-control" name="row[booking_project]">
                            <option value="">请选择预约报名项目</option>
                            <option value="1">项目一</option>
                            <option value="2">项目二</option>
                            <option value="3">项目三</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="c-form_type" class="control-label col-xs-12 col-sm-2">表单类型:</label>
                    <div class="col-xs-12 col-sm-8">
                        <div class="radio-inline">
                            <label for="c-form_type-1">
                                <input id="c-form_type-1" name="row[form_type]" type="radio" value="1" checked> 无表单
                            </label>
                        </div>
                        <div class="radio-inline">
                            <label for="c-form_type-2">
                                <input id="c-form_type-2" name="row[form_type]" type="radio" value="2"> 有表单
                            </label>
                        </div>
                    </div>
                </div>
                <div class="form-group" id="form-design-area" style="display: none;">
                    <label class="control-label col-xs-12 col-sm-2">表单设计:</label>
                    <div class="col-xs-12 col-sm-8">
                        <div id="form-fields-container">
                            <!-- 表单字段将在这里动态添加 -->
                        </div>
                        <button type="button" class="btn btn-info btn-sm" id="add-form-field">
                            <i class="fa fa-plus"></i> 添加字段
                        </button>
                        <input type="hidden" name="row[form_config]" id="form-config-data">
                    </div>
                </div>
                <!--接收者 receiver_id-->
                <div class="form-group">
                    <label for="c-receiver_id" class="control-label col-xs-12 col-sm-2">接收者:</label>
                    <div class="col-xs-12 col-sm-8">
                        <select id="c-receiver_id" class="form-control" name="row[receiver_id][]" data-rule="required" multiple="true" style="height: 300px;">
                            <option value="">请选择接收者</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="c-status" class="control-label col-xs-12 col-sm-2">状态:</label>
                    <div class="col-xs-12 col-sm-8" id="div-status">
                        <input id="c-status" name="row[status]" type="hidden" value="1">
                        <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-status" data-yes="1" data-no="0">
                            <i class="fa fa-toggle-on text-success fa-flip-horizontal fa-2x"></i>
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group layer-footer">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <button type="submit" class="btn btn-success btn-embossed disabled">{:__("OK")}</button>
                <button type="button" class="btn btn-primary" id="btn-send-now">立即发送</button>
                <button type="reset" class="btn btn-default btn-embossed">{:__("Reset")}</button>
            </div>
        </div>
    </div>
</form>


